FROM php:7.1.20-fpm-stretch

ADD tools/163.list    /etc/apt/sources.list
RUN apt-get update -y&&apt-get install -y apt-utils  unzip apt-utils git libfreetype6-dev   libjpeg62-turbo-dev   libmcrypt-dev  libpng-dev procps gcc g++  libiconv-hook-dev libxml2-dev  libcurl4-openssl-dev  procps iputils-ping net-tools
RUN docker-php-ext-install -j$(nproc) iconv mcrypt gd && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/  &&docker-php-ext-install pdo_mysql mysqli zip  pcntl sockets  sysvmsg sysvsem sysvshm shmop soap  opcache  xmlrpc


ADD tools/www.conf /usr/local/etc/php-fpm.d/
ADD tools/php-fpm.conf /usr/local/etc/
ADD tools/web /web
#swoole
RUN pecl install swoole &&docker-php-ext-enable swoole
RUN php --ri swoole
EXPOSE 9000 91
CMD /usr/local/sbin/php-fpm  -D&&php /web/index.php


